# main.py
from app import create_app


app = create_app()


@app.route("/")
def index():
    app.logger.info("这是一个测试日志消息 🚀 中文支持测试")
    return "Hello, Flask Logging!"


if __name__ == "__main__":
    app.run(
        host=app.config.get("HOST", "127.0.0.1"),
        port=app.config.get("PORT", 5001),  # 默认 fallback 到 8082
        debug=app.config.get("DEBUG", False),
    )
